
const Router = require('koa2-router')

const homeControll = require('./controller/home')
const userControll = require('./controller/user')
const router = new Router()

// router.get('/',async(ctx,next)=>{
//     ctx.body={
//         code:0,
//         msg:'成功'
//     }
// })


router.get('/:id',homeControll.testController)
router.post('/user/addUser',userControll.addUserController)
router.delete('/user/delete/:id',userControll.deleteUserController)
router.get('/user/get',userControll.getListController)
router.post('/user/add',userControll.addListController)

module.exports = router